import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/pages/layout'
import detail from '@/pages/detail'
import one from '@/pages/detail/one'
import two from '@/pages/detail/two'
import three from '@/pages/detail/three'
import four from '@/pages/detail/four'
Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'Layout',
      component: Layout
    },
    {
      path: '/detail',
      name: 'detail',
      component: detail,
      redirect:'/detail/one',
      children:[
       {
         path:"one",
         name:"one",
         component:one,
        
       },
       {
        path:"two",
        name:"two",
        component:two
      },
      {
        path:"three",
        name:"three",
        component:three
      },
      {
       path:"four",
       name:"four",
       component:four
     }
      ]
    }
  ]
})

